var scroll1, scroll2, scrollableframe;
function loaded() {
    scrollableframe = new iScroll('scrollableframe',
                          { useTransition:false,
                            checkDOMChanges: true,
                            hideScrollbar: true,
                            fixedScrollbar:true,
                            bounceLock: true }
                        );
    scroll1 = new iScroll('ricevimento',
                          { useTransition:false,
                            checkDOMChanges: true,
                            hideScrollbar: true,
                            fixedScrollbar:true,
                            onBeforeScrollStart : function(e) { e.stopPropagation();} } /*per evitare che scrollando un elemento
                                                                                         figlio si scrolli anche il padre*/
                        );
    scroll2 = new iScroll('corsi',
                          { useTransition:false,
                            checkDOMChanges: true,
                            hideScrollbar: true,
                            fixedScrollbar:true,
                            onBeforeScrollStart : function(e) { e.stopPropagation();} } /*per evitare che scrollando un elemento
                                                                                         figlio si scrolli anche il padre*/
                        );
    
    $('.ac-container article.selectable ul > li')
        .on('touchstart', function () {
            $(this).addClass('fake-active');
        })
        .on('touchend', function() {
            $(this).removeClass('fake-active');
        })
        .on('touchcancel', function() {
            $(this).removeClass('fake-active');
        });
}

document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
// document.addEventListener('DOMContentLoaded', loaded, false);
loaded();